﻿using System.Collections.Generic;

namespace CodeContrib
{
	public class RandomGender : IRandom<string>
	{
		private static readonly IEnumerable<string> _genders;
		private readonly RandomItem<string> _randomGender;

		static RandomGender()
		{
			_genders = new[]
				           {
					           "male", "female"
				           };
		}

		public RandomGender()
		{
			_randomGender = new RandomItem<string>(_genders);
		}

		public string Next()
		{
			return _randomGender.Next();
		}
	}
}